<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登陆成功</title>
    <link rel="stylesheet" href="static/layui/css/layui.css">
    <script src="static/layui/layui.js"></script>
</head>
<body>
<table id="demo" lay-filter="test"></table>
</body>
<script>
    layui.use('table', function(){
        var table = layui.table;
        //第一个实例
        table.render({
            elem: '#demo'
            ,height: 312
            ,url: 'userAjax' //数据接口
            ,page: true //开启分页
            ,limit:5
            ,limits:[5,10,15,20,25,30]
            ,cols: [[ //表头
                {field: 'id', title: '编号', width:80, sort: true, fixed: 'left'}
                ,{field: 'username', title: '用户名', width:120}
                ,{field: 'password', title: '密码', width:120, sort: true}
                ,{field: 'createtime', title: '创建时间', width:160}
                ,{field: 'phone', title: '手机号', width: 180}
            ]]
        });

    });
</script>
</html>
